package com.example.a2205douyin.baseMVVM.viewmodel;

import androidx.lifecycle.ViewModel;
import androidx.recyclerview.widget.RecyclerView;

import com.example.a2205douyin.baseMVVM.model.BaseRepo;

public abstract class BaseViewModel<Repo extends BaseRepo> extends ViewModel {
    protected Repo repo;

    public BaseViewModel() {
        repo = createRepo();//根据不同的业务去创建不同的repo层，所以在这里提供一个抽象的方法
    }

    protected abstract Repo createRepo();

}
